api: LEDS api introduction#17419
Conversation
Signed-off-by: Adi Suissa-Peleg <adip@google.com>
|
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
Signed-off-by: Adi Suissa-Peleg <adip@google.com>
| // The group of endpoints belonging to the locality specified. | ||
| repeated LbEndpoint lb_endpoints = 2; | ||
| repeated LbEndpoint lb_endpoints = 2 | ||
| [(udpa.annotations.field_migrate).oneof_promotion = "lb_config"]; |
There was a problem hiding this comment.
I don't think it's legal to have a repeated field in a oneof, so this oneof_promotion won't actually work. :(
There was a problem hiding this comment.
Yes you are correct, thanks!
I think the right way would be to support both lb_endpoints and the leds_cluster_locality_config (similar to what's being done for VHDS). I've looked at my implementation and it won't require much change.
There was a problem hiding this comment.
Alternatively, consider deprecating the existing lb_endpoints field and replacing it with a message that contains the repeated field, and then putting that message in the oneof. In other words, add this message:
message LbEndpoints {
repeated LbEndpoint lb_endpoints = 1;
}
And then change the fields here to:
// Deprecated -- use inline_endpoints instead.
repeated LbEndpoint lb_endpoints = 2 [deprecated = true];
oneof endpoints {
LbEndpoints inline_endpoints = 7;
LedsClusterLocalityConfig leds_cluster_locality_config = 8;
}
|
/wait |
Signed-off-by: Adi Suissa-Peleg <adip@google.com>
| // The group of endpoints belonging to the locality specified. | ||
| repeated LbEndpoint lb_endpoints = 2; | ||
| repeated LbEndpoint lb_endpoints = 2 | ||
| [(udpa.annotations.field_migrate).oneof_promotion = "lb_config"]; |
There was a problem hiding this comment.
Alternatively, consider deprecating the existing lb_endpoints field and replacing it with a message that contains the repeated field, and then putting that message in the oneof. In other words, add this message:
message LbEndpoints {
repeated LbEndpoint lb_endpoints = 1;
}
And then change the fields here to:
// Deprecated -- use inline_endpoints instead.
repeated LbEndpoint lb_endpoints = 2 [deprecated = true];
oneof endpoints {
LbEndpoints inline_endpoints = 7;
LedsClusterLocalityConfig leds_cluster_locality_config = 8;
}
|
Thanks for the suggestion. BTW: I've only looked at how Envoy's implementation handles this (which supporting both should not be hard), but not sure about other clients. |
|
I think either way would work. I don't find the argument of consistency with VHDS that compelling. I think that functionality was added to VHDS because there was a use-case for it, but it's not clear to me that we have a corresponding use-case for LEDS. But if there is such a use-case, then I think that would be a strong argument. I tend to favor clarity of the API over deprecation pain, but I do see that pain as well. Others may feel differently. I'd be interested to hear what others think. |
|
/cc @envoyproxy/api-shepherds With the introduction of LEDS we can do one of the following:
Any thoughts on this? |
|
I think we could just require that they are mutually exclusive in documentation and enforce in code rather than proto structure. |
Signed-off-by: Adi Suissa-Peleg <adip@google.com>
Signed-off-by: Adi Suissa-Peleg <adip@google.com>
Signed-off-by: Adi Suissa-Peleg <adip@google.com>
Signed-off-by: Adi Suissa-Peleg <adip@google.com>
|
Deprecating in the proto structure is probably the right way to go (from API standpoint). |
|
/lgtm api |
|
@lizan @mattklein123 for non-googler review. PTAL |
…bridge-stream * upstream/main: (32 commits) tls: move ssl connection info into SocketAddressProvider (envoyproxy#17334) conn pool: default enable runtime feature `conn_pool_delete_when_idle` (envoyproxy#17577) api: LEDS api introduction (envoyproxy#17419) kafka: add support for api versions request in mesh-filter (envoyproxy#17475) ext_proc: Implement BUFFERED_PARTIAL processing mode (envoyproxy#17531) tooling: Async/pathlib/mypy cleanups and utils (envoyproxy#17505) xds: restructure CertificateProvider fields (envoyproxy#17201) Refactor OverloadIntegrationTest breaking out a test base, and the fake resource monitors. (envoyproxy#17530) listener: move active connection collection out of active tcp listener (envoyproxy#16947) tools: format checks for backticks (envoyproxy#17566) coverage: set lower limit for common/quic and common (envoyproxy#17573) v2: final source removal (envoyproxy#17565) test: bumping coverage (envoyproxy#17564) quic: enforcing header size and contents (envoyproxy#17520) Support for canonicalizing URI properly for AWS SigV4 signer (envoyproxy#17137) listener: add a stat for transport socket connect timeout (envoyproxy#17458) listener: add listen() error handling (envoyproxy#17427) http: return per route config when direct response is set (envoyproxy#17449) removing most v2 references from source/ (envoyproxy#17415) bug fix: return bootstrap when validating config (envoyproxy#17499) ... Signed-off-by: Garrett Bourg <bourg@squareup.com>
Signed-off-by: Adi Suissa-Peleg <adip@google.com>
Commit Message: Adding the LEDS api
Additional Description:
This is the first part of the work on #10373.
Here we introduce the API changes in the load assignments configurations.
LEDS is only supported in delta-xDS (incremental).
Risk Level: Low - api changes only.
Testing: None - api changes only.
Docs Changes: None at the moment.
Release Notes: None at the moment.
Platform Specific Features: N/A.
Signed-off-by: Adi Suissa-Peleg adip@google.com